
class Draws{
    private int hight;
    public Draws(int hight){
        this.hight=hight;
    }
    public  void drawtriangle(){
        for(int i=1;i<=hight;i++){
            for(int j=hight-i;j>0;j--){
                System.out.print(" ");}
            for(int k=1;k<=2*i-1;k++)
            {System.out.print("+");}
            System.out.println();}
    }
    public void drawrectangle(){
        for(int i=1;i<=hight;i++){
            for(int j=1;j<=hight+9;j++)
            {System.out.print("+");}
            System.out.println();}
    }
    public void drawsquare(){
        for(int i=1;i<=hight;i++){
            for(int j=1;j<=hight;j++)
            {System.out.print("+");}
            System.out.println();}
    }
    void drawrhomid(){
        for(int i=1;i<=hight;i++){
            for(int j=hight-i;j>0;j--){
                System.out.print(" ");}
            for(int k=1;k<=hight;k++)
            {System.out.print("+");}
            System.out.println();}
    }
};

public class Draw {
    public static void main(String []args){
        Draws a=new Draws(3);
        System.out.println("三角形：");
        a.drawtriangle();
        System.out.println("矩形：");
        a.drawrectangle();
        System.out.println("正方形：");
        a.drawsquare();
        System.out.println("平行四边形：");
        a.drawrhomid();
    }

}
